FROM alpine:latest

COPY eth-net-intelligence-api/ /root/eth-net-intelligence-api
COPY app.json /root/eth-net-intelligence-api/app.json

RUN apk add --update bash nodejs nodejs-npm && \
    npm install -g cnpm --registry=https://registry.npm.taobao.org && \
    cd /root/eth-net-intelligence-api && \
    cnpm install && \
    cnpm install -g pm2

CMD ["pm2","start","/root/eth-net-intelligence-api/app.json","--no-daemon"]
